<div class="mails index">
<h2><?php __('Historial de Emails enviados');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Pagina %page% de %pages%, mostrando %current% registros de un total de %count% , empezando con el registro %start%, finalizando con %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<th><?php echo $paginator->sort('mail');?></th>
	<th><?php echo $paginator->sort('asunto');?></th>
	<th><?php echo $paginator->sort('texto');?></th>
	<th><?php echo $paginator->sort('fecha');?></th>
	<!--<th><?php //echo $paginator->sort('tipo');?></th>-->
	<!--<th><?php //echo $paginator->sort('estado');?></th>-->
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($mails as $mail):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php /*echo $mail['Mail']['mail']; */
			       echo $i;?>
		</td>
		<td>
			<?php echo $mail['Mail']['asunto']; ?>
		</td>
		<td>
			<?php echo $mail['Mail']['texto']; ?>
		</td>
		<td>
			<?php echo $mail['Mail']['fecha']; ?>
		</td>
	
		<td class="actions">
			<?php echo $html->link(__('Ver detalle', true), array('action'=>'view', $mail['Mail']['mail'])); ?>
			<?php echo $html->link(__('Eliminar', true), array('action'=>'delete', $mail['Mail']['mail']), null, sprintf(__('Esta seguro que eliminar borrar el mail "%s"?', true), $mail['Mail']['asunto'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('anterior', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('siguiente', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Enviar nuevo Email', true), array('action'=>'add')); ?></li>
	</ul>
</div>
